package com.fowo.api.model.ucp;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import javax.validation.constraints.*;
import lombok.Getter;
import lombok.Setter;

/** UPC管理 导入导出辅助模型 */
@Getter
@Setter
public class UcpExcelPo {

  @Size(max = 50, message = "编码类型长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "编码类型")
  private String type;

  @Size(max = 50, message = "商品编码长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "商品编码")
  private String code;

  @Size(max = 50, message = "使用状态长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "使用状态")
  private String status;

  @Size(max = 50, message = "使用人长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "使用人")
  private String userName;

  @ExcelIgnore
  @ExcelProperty(value = "使用人")
  private Long user;

  @Size(max = 500, message = "备注长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "备注")
  private String remark;

  @Size(max = 50, message = "使用时间长度不能超过20")
  @DateTimeFormat("yyyy年MM月dd日HH:mm:ss")
  @ExcelProperty(value = "使用时间")
  private java.util.Date useTime;
}
